# Image.Debug


# Properties

| Data Type | Property Name | Default Value | Description |
| --- | --- | --- | --- |
| Boolean | `Image.Debug.ENABLED` | false | Enable/disable debug mode. |


# Methods

## `print`

Prints a debug message to the console.

**Signature:**

```Lua
Image.Debug:print( msg )
```

**Returns:** None.

**Parameters:**

1. (String) The message.


# Image.UI


# Properties

| Data Type | Property Name | Default Value | Description |
| --- | --- | --- | --- |
| Table | `Image.UI.Box.Pixel.Config` | nil | Default pixel configuration. |
| Table | `Image.UI.Box.Pixel.Instances` | nil | Array of instances of UI.Box pixel elements. |


# Methods

## `IsEmpty`

Checks whether the current image is empty.

**Signature:**

```Lua
Image.UI:IsEmpty()
```

**Returns:** True if the loaded image is empty. Otherwise, returns false.

**Parameters:** None.


## `GetWidth`

Returns current image width.

**Signature:**

```Lua
Image.UI:GetWidth()
```

**Returns:**

* (Integer) The image width.

  **or**

* `nil` if loaded image is empty. 

**Parameters:** None.


## `GetHeight`

Returns current image height.

**Signature:**

```Lua
Image.UI:GetHeight()
```

**Returns:**

* (Integer) The image height.

  **or**

* `nil` if loaded image is empty. 

**Parameters:** None.


## `PixelCount`

Returns the total of loaded pixels.

**Signature:**

```Lua
Image.UI:PixelCount()
```

**Returns:**

* (Integer) The pixel counts. 

**Parameters:** None.


## `Create`

Initializes the UI.Box pixel elements with given position and size.

**Signature:**

```Lua
Image.UI:Create( position , size )
```

**Returns:**

* (Table) The `Image.UI.Box.Pixel.Instances` property value.

  **or**

* `nil` if parameter(s) is/are invalid. 

**Parameters:** 

1. (Table) The location on player's screen.

2. (Table) The image size.


## `Get`

Returns a pixel from initialized pixels with given position.

**Signature:**

```Lua
Image.UI:Get( position )
```

**Returns:**

* (Table) The one of `Image.UI.Box.Pixel.Instances` property value.

  **or**

* `nil` if parameter(s) is/are invalid or out of range. 

**Parameters:** 

1. (Table) The location on player's screen.


## `Set`

Sets the current image with given pixels data.

The default data type is ImageMagick.

**Signature:**

```Lua
Image.UI:Set( data , data_type )
```

**Returns:** None.

**Parameters:** 

1. (Table) The array of pixels data.

2. (Integer) One of `Image.Enum.TYPE` value.


## `Clear`

Hides current loaded image.

**Signature:**

```Lua
Image.UI:Clear()
```

**Returns:** None.

**Parameters:** None.


## `Show`

Shown the current image.

**Signature:**

```Lua
Image.UI:Show()
```

**Returns:** None.

**Parameters:** None.


# Image.ImageMagick


# Methods


## `Set`

Sets the current image with given ImageMagick raw pixels data.

**Signature:**

```Lua
Image.ImageMagick:Set( data )
```

**Returns:** True if succeed. Otherwise, returns false.

**Parameters:** 

1. (Table) The array of pixels data.


# Image.Enum.TYPE

# Properties

| Data Type | Property Name | Default Value | Description |
| --- | --- | --- | --- |
| Integer | `Image.Enum.TYPE.IMAGEMAGICK` | 1 | Pixels data type is ImageMagick raw pixels. |
| Integer | `Image.Enum.TYPE.DEFAULT` | 1 | The default pixels data type. |
| Integer | `Image.Enum.TYPE.UNKNOWN` | 999 | Unknown pixels data type. |

